package org.example.threadcoreknowledge.createthreads.lambda;

/**
 * @author lin.jia
 */
public class LambdaBasicsByInterfaceImpl implements LambdaBasicsByInterface {

    LambdaBasicsByInterface lambdaBasicsByInterface;

    public LambdaBasicsByInterfaceImpl() {
    }

    public LambdaBasicsByInterfaceImpl(LambdaBasicsByInterface lambdaBasicsByInterface) {
        this.lambdaBasicsByInterface = lambdaBasicsByInterface;
    }

    /**
     * 测试方法
     */
    @Override
    public void write() {
        if (lambdaBasicsByInterface != null) {
            lambdaBasicsByInterface.write();
        }
    }
}
